#pragma once
#include "queue.h"
#include "Client.h"
#include "CallerMachine.h"
#include "BankWidget.h"
enum class WidgetType { COMMON, SPECIAL };

typedef struct Widgets {
	BankWidget<Client> widget;
	int num;
	WidgetType type;
	//bool operator <=(const Widgets& other)const;
	//bool operator >=(const Widgets& other)const;
}Widgets;

class Bank
{
private:
	Widgets widgets[11];
	CallerMachine caller;
public:
	Bank() {
		for (int i = 1; i <= 7; i++) { widgets[i].num = i; widgets[i].type = WidgetType::COMMON; }
		for (int i = 8; i <= 10; i++){ widgets[i].num = i; widgets[i].type = WidgetType::SPECIAL;}
	}
	CallerMachine& getCallerMachine();
	void heapAdjust(WidgetType type);		//调整堆
	Widgets& getWidgets();					//获取窗口(结构体数组)
};

